package com.itheima.Ref反射;

public class TestStudent {
    public static void main(String[] args) throws ClassNotFoundException {

        //1. Class类中的静态方法forname("全类名")
        // 全类名: 包名+类名
        Class class1 = Class.forName("com.itheima.Ref反射.Student");
        System.out.println(class1);

        //2.通过Class属性来获取
        Class class2 = Student.class;
        System.out.println(class2);

        //3.利用对象的getClass方法获取Class对象
        Student stu = new Student();
        Class class3 = stu.getClass();

        System.out.println(class3);
    }
}
